﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCSignatureDeparture.ascx.cs" Inherits="MTRC.ODMS.Web.SOM.UserControl.UCSignatureDeparture" %>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" /> 
<script  type="text/jscript" language="JavaScript" src="../../Javascript/CommonFunction.js"></script> 

<script language="javascript" type="text/javascript">
//------------------------------20090121--------------//huangyao 20090122 fixed TD:1156
function OpenPhotoCaptureFormDeparture(isReadOnly, eventSignType, signatureFullFileName, strClientID) 
{
    //debugger;
    var result;
	var urlPhotoCapture;
	urlPhotoCapture='../../SOM/Popup/PopupPhotoCaptureDepartureContainer.htm?isReadOnly=' + isReadOnly + "&eventSignType=" + eventSignType + '&FormTitle=<%=this.GetLabel("SOM_SignType_PhotoCapture")%>' + '&signatureFullFileName=' + signatureFullFileName;
    result = window.showModalDialog(urlPhotoCapture, "newwin1", "DialogWidth:333px;DialogHeight:305px;help:no;status:no;scroll:no"); //scroll:no
    
    //window.document.getElementById('<%=this.hdnSignType.ClientID%>').value = "1";  //means Cap Photo
    var radioObjectName = strClientID + '_hdnSignType'; 
    window.document.getElementById(radioObjectName).value = "1";  //means Cap Photo
    if(isReadOnly != "true")
    {
        __doPostBack(document.getElementById('<%=this.hdnForRefresh.ClientID%>').id, "")
    }
    
    //--//SetControlOwnSameValue(strClientID);
}

function OpenHandWrittenFormDeparture(isReadOnly, eventSignType, signatureFullFileName, strClientID) 
{
    //debugger;	
    var result;
	var urlSignature;
	urlSignature='../../SOM/Popup/PopupSignatureDepartureContainer.htm?isReadOnly=' + isReadOnly + '&eventSignType=' + eventSignType + '&FormTitle=<%=this.GetLabel("SOM_SignType_HandWritten")%>' + '&signatureFullFileName=' + signatureFullFileName;
    result = window.showModalDialog(urlSignature, "newwin1", "DialogWidth:260px;DialogHeight:210px;help:no;status:no;scroll:no"); //scroll:no	
    
    //window.document.getElementById('<%=this.hdnSignType.ClientID%>').value = "2"; //means Handwritten
    var radioObjectName = strClientID + '_hdnSignType'; 
    window.document.getElementById(radioObjectName).value = "2";
    if(isReadOnly != "true")
    {
        __doPostBack(document.getElementById('<%=this.hdnForRefresh.ClientID%>').id, "")
    }
    
    //--//SetControlOwnSameValue(strClientID);
}
//------------------------------20090121--------------

</script>
<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td nowrap>
            <asp:Label ID="lblSignature" runat="server" Text="Signature:" Width="100%"></asp:Label>
        </td>
        <td style="width: 105px;">
            <asp:Button ID="btnPhotoCapture" runat="server" Text="Photo Capture" Width="100px" />
        </td>
        <td style="width: 105px;">    
            <asp:Button ID="btnHandWritten" runat="server" Text="Handwritten" Width="100px" />
        </td>
        <td align="left" style="width: 30px;">
            <asp:Image ID="imgSignature" runat="server" ImageUrl="~/Images/SOM/Sign_UnSignature.gif" BorderColor=gray BorderWidth=1 />
            <asp:Image ID="imgBookOnUnSigPic" runat="server" ImageUrl="~/Images/SOM/Sign_UnSignature.gif" BorderColor=gray BorderWidth=1 style="display: none" />
            <asp:Image ID="imgBookOnSigPic" runat="server" ImageUrl="~/Images/SOM/Sign_Signature.gif" BorderColor=gray BorderWidth=1 style="display: none" />
        </td>
        <td align="left">
            <asp:button Visible="false" id="btnOpenCapture" runat="server" Class="button" Text="..." ToolTip="Show Book On Signature details panel"></asp:button> <%--//huangyao 20090122 fixed TD:1156--%>
            <INPUT type="hidden" id="hdnSignFileName" name="hdnSignFileName" value="" runat="server">
            <INPUT type="hidden" id="hdnSignType" name="hdnSignType" value="" runat="server">
            <INPUT type="hidden" id="hdnForRefresh" name="hdnForRefresh" value="Intial Value" runat="server" onserverchange="hdnForRefresh_ServerChange">
            <INPUT type="hidden" id="hdnEventNo" name="hdnEventNo" value="" runat="server">
        </td>
    </tr>
</table>
